package com.springcloud.hystrixdashboardturbine;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: wyzj3
 * @description: 提供hello服务
 * @author: 肖垚 1094890313@qq.com
 * @create: 2019年01月17日 17:59
 **/
@RefreshScope
@RestController
public class HelloController {
    // 从 application.properties 中读取配置，如取不到默认值为Hello
    @Value("${name}")
    private String name;

    @RequestMapping("/name")
    public String from() {
        return this.name;
    }
}
